﻿@model TeamOPSchoolCup.Domain.POCO.Region
@{
    ViewBag.Title = "Create";
}

@section region{
    <link rel="Stylesheet" href="@Url.Content("~/Content/css/Region.css")" type="text/css" />
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset id="addRegion">
        <legend>Add Region</legend>
        <div>
            <div class="label">
                @Html.LabelFor(model => model.Name):   
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>
        <div>
            <div class="label">
                @Html.LabelFor(model => model.ParentId, "Parent"): 
            </div>
            <div class="editor-field">
                @Html.TextBox("Parent.Name", null, new { disabled = "disabled" })
                @Html.ValidationMessageFor(model => model.ParentId)
            </div>
        </div>
        <p>
            <input type="submit" value="Add" />
        </p>
    </fieldset>
}

<div id="btl">
    @Html.ActionLink("Back to Continents", "Index")
</div>